<template>
  <span class="filelist-links">
    <el-tag v-for="d in data" :key="d.url" size="small" @click="handleClick(d)">{{ d.name }}</el-tag>

  </span>
</template>
<script>
export default {
  name: 'Filelist',
  props: {
    data: {
      type: Array,
      default: () => {
        return []
      }
    }
  },
  methods: {
    handleClick(file) {
      window.open(file.url, '_blank')
    }
  }
}
</script>
<style lang="scss" scoped>
.filelist-links{
  .el-tag+.el-tag{
    margin-left: 5px;

  }
  .el-tag{
    cursor: pointer;
    &:hover{
      text-decoration: underline;
    }
  }

}
</style>
